//
//  YDHUD.m
//  司机端
//
//  Created by 任梦晨 on 17/3/22.
//  Copyright © 2017年 YD. All rights reserved.
//

#import "YDHUD.h"

@implementation YDHUD
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ (YDHUD *)juhuaHUD {
    
    YDHUD *HUD = [[YDHUD alloc] init];
    HUD.mode = MBProgressHUDModeIndeterminate;
    HUD.removeFromSuperViewOnHide = YES;
    HUD.color = [UIColor clearColor];
    HUD.contentColor = [UIColor whiteColor];
    HUD.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
    HUD.bezelView.color = [UIColor blackColor];
    return HUD;
}

+ (void)showTextHUDWithText:(NSString *)text view:(UIView *)backView{
    MBProgressHUD *HUD = [[MBProgressHUD alloc] init];
    [backView addSubview:HUD];
    HUD.mode = MBProgressHUDModeText;
    HUD.removeFromSuperViewOnHide = YES;
    HUD.cornerRadius = 10;
    HUD.color = [UIColor blackColor];
    HUD.color = [HUD.color colorWithAlphaComponent:1];
    HUD.labelColor = [UIColor whiteColor];
    HUD.labelFont = [UIFont systemFontOfSize:17];
    HUD.labelText = text;
    
    
    // HUD2.yOffset = 100;
    [HUD show:YES];
    [HUD hide:YES afterDelay:1];

}
#pragma clang diagnostic pop

@end
